import { axios } from '@/utils/request'
import { mimeMap, resolveBlob } from '@/utils/download'

const api = {
  activityList: '/admin/activity/union/list',
  activityDel: '/admin/activity/union/remove',

  activityRegisterList: '/uniapp/activityRegister/pageList',
  activityAudits: '/uniapp/activityRegister/updateApprovalStatus',
  activityDisplay: '/admin/activity/union/display', //活动上下架

  sendMsg: '/admin/sendMsg/create', //发送模板消息

  /**
   * 活动名单相关api
   */
  rosterList: '/admin/activityRegister/union/list', //活动名单列表
  queryActivityMember: '/admin/activityRegister/queryActivityMember', //批量报名列表（指定人员）
  queryNotRegistration: 'admin/app-user-info/queryNotRegistration', //批量报名列表（非指定人员）
  batchRegistration: '/admin/activityRegister/union/batchRegistration', //活动批量报名
  activityRegisterVerify: '/admin/activityRegister/union/verify', //活动报名审核
  nonmemberList: '/admin/guests-user/nonmemberList', //非会员代报名人员
  guestsUserAdd: '/admin/guests-user/add', //新增嘉宾
  batchGuestsRegistration: '/admin/activityRegister/union/batchGuestsRegistration', //非会员代报名
  cancelRegistration: '/admin/activityRegister/union/cancelRegistration/', //取消报名
  cancelRegistrationBatch: '/admin/activityRegister/union/batchCancelRegistratio',
  anewRegistration: '/admin/activityRegister/union/anewRegistration/', //重新报名

  /**
   * 活动场地相关api
   */
  activitySiteList: '/admin/activitySite/union/list', //活动场地列表
  activitySiteCreate: 'admin/activitySite/union/create', //活动场地新增
  activitySiteEdit: '/admin/activitySite/union/edit', //活动场地修改
  activitySiteRemove: '/admin/activitySite/union/remove', //活动场地删除
  seatInfo: '/admin/activitySite/union/seat/info/', //活动场地座位详情
  seatEdit: '/admin/activitySite/union/seat/edit', //活动场地座位修改
  activityRegisterSeatInfo: '/admin/activityRegister/seat/info/', //活动报名-座位信息
  activityRegisterSeatEdit: '/admin/activityRegister/seat/edit', //活动报名-编辑座位

  /**
   * 活动信息收集相关
   */
  formById: '/admin/activity-form-item/union/getById/',
  addOrUpdateForm: '/admin/activity-form-item/union/addOrUpdate',
  formItemDeleteTip: '/admin/activity-form-item/union/formItemDeleteTip'
}

export default api

/**
 * 活动退费导出
 * @param {*} data
 * @returns
 */
export function activityRefundRegisterExport(data) {
  return axios({
    url: `/admin/activityRegister/union/asyncRefundExportExcel`,
    method: 'post',
    data
  })
}
/**
 * 活动报名名单导出
 */
export function activityRegisterExport(data) {
  return axios({
    url: `/admin/activityRegister/union/asyncExportExcel`,
    method: 'post',
    data
  })
}

/**
 * 活动列表
 */
export function activityList(data) {
  return axios({
    url: api.activityList + `?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 活动管理删除
 */
export function activityDel(data) {
  return axios({
    url: api.activityDel,
    method: 'post',
    data
  })
}

/**
 * 审核人员列表
 */
export function activityRegisterList(params) {
  return axios({
    url: api.activityRegisterList,
    method: 'get',
    params
  })
}

/**
 * 审核状态修改
 */
export function activityAudits(data) {
  return axios({
    url: api.activityAudits + '/' + data.status + '/' + data.id,
    method: 'get',
    data
  })
}

/**
 * 活动上下架
 */
export function activityDisplay(data) {
  return axios({
    url: api.activityDisplay + `/${data.id}/${data.display}`,
    method: 'get'
  })
}

/**
 * 活动发送消息
 */
export function sendMsg(data) {
  return axios({
    url: api.sendMsg,
    method: 'post',
    data
  })
}

/**
 * 活动名单列表
 */
export function rosterList(data) {
  return axios({
    url: api.rosterList + `?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 批量报名列表（指定人员）
 */
// export function queryActivityMember(data) {
//   return axios({
//     url: api.queryActivityMember + `?current=${data.current}&size=${data.pageSize}`,
//     method: 'post',
//     data
//   })
// }

export function queryActivityMember(data) {
  return axios({
    url: api.queryActivityMember + `?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 批量报名列表（非指定人员）
 */
export function queryNotRegistration(data) {
  return axios({
    url: api.queryNotRegistration + `?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 批量报名列表（非会员）
 */
export function nonmemberList(data) {
  return axios({
    url: api.nonmemberList + `?current=${data.current}&size=${data.pageSize}`,
    method: 'get',
    params: data
  })
}

/**
 * 新增嘉宾
 */
export function guestsUserAdd(data) {
  return axios({
    url: api.guestsUserAdd,
    method: 'post',
    data
  })
}

/**
 * 非会员代报名
 */
export function batchGuestsRegistration(data) {
  return axios({
    url: api.batchGuestsRegistration,
    method: 'post',
    data,
    timeout: 0
  })
}

/**
 * 取消报名
 */
export function cancelRegistration(id) {
  return axios({
    url: api.cancelRegistration + id,
    method: 'post'
  })
}

/**
 * 批量取消报名
 * @param {*} id
 * @param {*} data
 * @returns
 */
export function cancelRegistrationBatch(data) {
  return axios({
    url: api.cancelRegistrationBatch,
    method: 'post',
    data
  })
}

/**
 * @description 打印胸卡
 * @date 03/04/2023
 * @export
 * @param {*} id
 */
export function printChestCard(id, printerNo) {
  return axios({
    url: `/admin/activityRegister/union/printChestCard/${id}/${printerNo}`,
    method: 'post'
  })
}

/**
 * 重新报名
 */
export function anewRegistration(id) {
  return axios({
    url: api.anewRegistration + id,
    method: 'post'
  })
}

/**
 * 活动批量报名
 */
export function batchRegistration(data) {
  return axios({
    url: api.batchRegistration,
    method: 'post',
    data,
    timeout: 0
  })
}

/**
 * 活动报名审核
 */
export function activityRegisterVerify(data) {
  return axios({
    url: api.activityRegisterVerify + `/${data.id}/${data.status}`,
    method: 'get'
  })
}

/**
 * 活动场地列表
 */
export function activitySiteList(params) {
  return axios({
    url: api.activitySiteList + `?current=${params.current}&size=${params.pageSize}`,
    method: 'get'
  })
}

/**
 * 活动场地新增
 */
export function activitySiteCreate(data) {
  return axios({
    url: api.activitySiteCreate,
    method: 'post',
    data
  })
}

/**
 * 活动场地修改
 */
export function activitySiteEdit(data) {
  return axios({
    url: api.activitySiteEdit,
    method: 'post',
    data
  })
}

/**
 * 活动场地删除
 */
export function activitySiteRemove(ids) {
  return axios({
    url: api.activitySiteRemove,
    method: 'post',
    data: ids
  })
}

/**
 * 活动场地座位详情
 */
export function seatInfo(id) {
  return axios({
    url: api.seatInfo + id,
    method: 'get'
  })
}

/**
 * 活动场地座位修改
 */
export function seatEdit(data) {
  return axios({
    url: api.seatEdit,
    method: 'post',
    data
  })
}

/**
 * 活动报名-座位信息
 */
export function activityRegisterSeatInfo(id) {
  return axios({
    url: api.activityRegisterSeatInfo + id,
    method: 'get'
  })
}

/**
 * 活动报名-座位修改
 */
export function activityRegisterSeatEdit(data) {
  return axios({
    url: api.activityRegisterSeatEdit,
    method: 'post',
    data
  })
}

/**
 * 活动排座-查询活动安排信息
 */
export function getActivityArrangeInfo(data) {
  return axios({
    url: '/admin/activityArrange/getActivityArrangeInfo',
    method: 'get',
    params: data,
    timeout: 30000
  })
}

/**
 * 活动排座-新增活动场次
 */
export function createActivityArrange(data) {
  return axios({
    url: '/admin/activityArrange/create',
    method: 'post',
    data
  })
}

/**
 * 活动排座-编辑活动场次
 */
export function editActivityArrange(data) {
  return axios({
    url: '/admin/activityArrange/edit',
    method: 'post',
    data
  })
}

/**
 * 活动排座-删除活动场次
 * activityArrangeId  场次ID
 */
export function removeActivityArrange(data) {
  return axios({
    url: '/admin/activityArrange/del',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-查询活动场次的可分配人数和已分配人数
 */
export function getActivityArrangeNum(data) {
  return axios({
    url: '/admin/activityArrange/getActivityArrangeCapacity',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-新增组
 * activityArrangeId 场次ID
 * groupNum  组数
 * 之前接口 /admin/activityArrange/addActivityArrangeGroup
 */
export function addActivityArrangeGroup(data) {
  return axios({
    url: '/admin/activityArrange/addActivityArrangeGroupAndRes',
    method: 'get',
    params: data
  })
}

/**
 * @description 修改组排序
 * @date 04/09/2024
 * @export
 * @param {*} data
 */
export function activitySwapArrangeGroup(data) {
  return axios({
    url: '/admin/activityArrange/swapArrangeGroup',
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-编辑分组名称
 * id 分组ID
 * name 分组名称
 */
export function editActivityArrangeGroup(data) {
  return axios({
    url: '/admin/activityArrange/editActivityArrangeGroup',
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-删除分组
 * groupId 分组ID
 */
export function delActivityArrangeGroup(data) {
  return axios({
    url: '/admin/activityArrange/delActivityArrangeGroup',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-分组-添加座位
 * groupId 分组ID
 */
export function activityArrangeAddSeat(data) {
  return axios({
    url: '/admin/activityArrange/addSeat',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-分组-删除座位
 * seatId 座位ID
 */
export function activityArrangeDelSeat(data) {
  return axios({
    url: '/admin/activityArrange/delSeat',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-分组-交换座位
 * seatId 座位ID
 * targetSeatId 交换座位ID
 */
export function activityArrangeSwapSeat(data) {
  return axios({
    url: '/admin/activityArrange/swapSeat',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-分组-清空座位
 * seatId 座位ID
 */
export function activityArrangeClear(data) {
  return axios({
    url: '/admin/activityArrange/clearSeat',
    method: 'get',
    params: data
  })
}

/**
 * 活动排座-场次-分组-修改座位名称
 * id 座位ID
 * name 座位名称
 */
export function activityUpdateSeatName(data) {
  return axios({
    url: '/admin/activityArrange/updateSeatName',
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-查询报名人员
 * activityId 活动ID
 * activityArrangeId  场次ID
 */
export function activityArrangeRegisterList(data) {
  return axios({
    url: `/admin/activityArrange/activityRegisterList?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-分组-占座
 * seatId 座位ID
 */
export function activityArrangeLockSeat(data) {
  return axios({
    url: `/admin/activityArrange/lockSeat`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-分组-批量用户排座
 * groupId 组ID
 * usetList: [{userId, userName, userCompanyName, userPosition}]
 */
export function activityArrangeBatchAssignedSeat(data) {
  return axios({
    url: `/admin/activityArrange/batchAssignedSeat`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-分组-指定用户排座
 * seatId 座位ID
 * userId, userName, userCompanyName, userPosition
 */
export function activityArrangeAssignedSeat(data) {
  return axios({
    url: `/admin/activityArrange/assignedSeat`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-分组-指定用户排座(座位为占座座位)
 * seatId 座位ID
 * userId, userName, userCompanyName, userPosition
 */
export function activityArrangeAssignedSeatToLockSeat(data) {
  return axios({
    url: `/admin/activityArrange/assignedSeatToLockSeat`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-场次-分组-导入座位编号
 * groupId 组ID
 * importSeatCodeStr 导入字符串逗号隔开
 */
export function activityArrangeImportSeatCode(data) {
  return axios({
    url: `/admin/activityArrange/importSeatCode`,
    method: 'post',
    data
  })
}

/**
 * 活动排座-导出Excel
 * activityId 活动ID
 */
export function activityArrangeExportExcel(data) {
  axios({
    url: `/admin/activityArrange/exportExcel`,
    method: 'get',
    responseType: 'blob',
    timeout: 0,
    params: data
  }).then(res => {
    resolveBlob(res, mimeMap.xlsx)
  })
}

/** 获取活动自定义表单 */
export function FormById(id) {
  return axios({
    url: api.formById + id,
    method: 'get'
  })
}

/** 新增、编辑活动自定义表单 */
export function AddOrUpdateForm(data) {
  return axios({
    url: api.addOrUpdateForm,
    method: 'post',
    data
  })
}

/** 活动信息收集表单-判断是否可删除自定义字段 */
export function FormItemDeleteTip(params) {
  return axios({
    url: api.formItemDeleteTip,
    method: 'get',
    params
  })
}

/**
 * 活动-签到管理-打印设备列表
 */
export function activityDeviceList(params = { current: 1, size: 100 }) {
  return axios({
    url: `/im/hanyin/device/list`,
    method: 'get',
    params
  })
}

/**
 * 活动-签到管理-添加打印设备
 */
export function activityDeviceAdd(data) {
  return axios({
    url: `/im/hanyin/device/add`,
    method: 'post',
    data
  })
}

/**
 * 活动-签到管理-编辑打印设备
 */
export function activityDeviceUpdate(data) {
  return axios({
    url: `/im/hanyin/device/update`,
    method: 'post',
    data
  })
}

/**
 * 活动-签到管理-删除打印设备
 */
export function activityDeviceDelete(data) {
  return axios({
    url: `/im/hanyin/device/delete`,
    method: 'post',
    data
  })
}

/**
 * 活动-胸卡管理-添加/编辑打印设备
 */
export function activityDeviceAddOrUpdate(type, data) {
  return axios({
    url: `/im/hanyin/device/${type}`,
    method: 'post',
    data
  })
}
/**
 * 活动-胸卡管理-打印
 */
export function devicePrint(data) {
  return axios({
    url: `/im/hanyin/print`,
    method: 'post',
    data
  })
}
/**
 * 活动-名单列表-批量打印胸卡
 */
export function printChestCardList(data) {
  return axios({
    url: `/admin/activityRegister/union/printChestCardList`,
    method: 'post',
    data
  })
}

/**
 * 活动-活动绑定设备
 */
export function deviceActBind(data) {
  return axios({
    url: `/im/hanyin/device/act/bind`,
    method: 'post',
    data
  })
}
/**
 * 活动-活动绑定设备列表
 */
export function deviceActList(params) {
  return axios({
    url: `/im/hanyin/device/act/list`,
    method: 'get',
    params
  })
}
/**
 * 活动-可绑定设备列表
 */
export function deviceSelectList() {
  return axios({
    url: `/im/hanyin/device/select/list`,
    method: 'get'
  })
}

/**
 * 活动-报名名单-更新参会证
 */
export function updateAttendanceCard(id) {
  return axios({
    url: `/admin/activityRegister/union/updateAttendanceCard/${id}`,
    method: 'post',
    timeout: 0
  })
}

/** 活动-排座=新增代报名数据 */
export function addActivityRegister(data) {
  return axios({
    url: '/admin/activityRegister/union/addActivityRegister',
    method: 'post',
    data
  })
}

/** 活动-编辑报名数据 */
export function updateActivityRegister(data) {
  return axios({
    url: '/admin/activityRegister/union/updateActivityRegister',
    method: 'post',
    data
  })
}

/** 活动标签-列表 */
export function getActivityLabelList(id) {
  return axios({
    url: `/admin/activity-label/union/list/${id}`,
    method: 'get'
  })
}

/** 标签-新增 */
export function labelAdd(data) {
  return axios({
    url: `/admin/activity-label/union/add`,
    method: 'post',
    data
  })
}

/** 标签-批量添加标签 */
export function branchLabelAdd(data) {
  return axios({
    url: `/admin/activity-register-label/union/add`,
    method: 'post',
    data
  })
}

/** 标签-删除标签 */
export function labelDel(registerId, labelId) {
  return axios({
    url: `/admin/activity-register-label/union/del/${registerId}/${labelId}`,
    method: 'post'
  })
}

/** 浏览记录 */
export function BrowseSet(params) {
  return axios({
    url: `/admin/behaviorBrowse/mp/browseSetUnion`,
    method: 'get',
    params
  })
}

/**
 * 邀约浏览记录
 * @param {*} params
 * @returns
 */
export function browseList(params) {
  return axios({
    url: `/admin/activity-union/invite/sys/browseList`,
    method: 'get',
    params
  })
}

/** 获取活动分享二维码 */
export function CreateDetailsQrcode(id) {
  return axios({
    url: `/admin/activity/union/createDetailsQrcode/${id}`,
    method: 'get'
  })
}

//活动联系人列表
export function ContactList() {
  return axios({
    url: `/admin/activity-contact/list`,
    method: 'get'
  })
}

//新增活动联系人
export function ContactAddOrUpdate(data) {
  return axios({
    url: `/admin/activity-contact/addOrUpdate`,
    method: 'post',
    data
  })
}

//活动置顶
export function ActivityTop(id) {
  return axios({
    url: `/admin/activity/union/top/${id}`,
    method: 'get'
  })
}

//活动取消置顶
export function ActivityRemoveTop(id) {
  return axios({
    url: `/admin/activity/union/removeTop/${id}`,
    method: 'get'
  })
}

//活动报名列表全选
export function selectAllActivityRegister(params) {
  return axios({
    url: `/admin/activityRegister/union/allIds`,
    method: 'post',
    data: params
  })
}

/**
 * 取消报名批量审核全选
 * @param {*} params
 * @returns
 */
export function selectAllActivityCancelRegister(params) {
  return axios({
    url: `/admin/activity-register-order/union/allIds`,
    method: 'post',
    data: params
  })
}

/**
 * 通过id批量查询报名用户信息
 * @param {*} params
 * @returns
 */
export function registerInfoByIds(params) {
  return axios({
    url: `/admin/activityRegister/union/registerInfoList`,
    method: 'post',
    data: params
  })
}

//活动报名删除
export function activityRegisterDel(id) {
  return axios({
    url: `/admin/activityRegister/union/del/${id}`,
    method: 'post'
  })
}

/** 活动-报名模板导出-自定义字段 */
export function exportActivityTemplate(id) {
  return axios({
    url: `/admin/activity-form-item/union/exportActivityRegisterTemplate?activityId=${id}`,
    method: 'get',
    responseType: 'blob',
    timeout: 0
  }).then(res => {
    resolveBlob(res, mimeMap.xlsx)
  })
}

/** 活动-报名模板导入-自定义字段 */
export function syncActivityImportExcel(data, id) {
  return axios({
    url: `/admin/activity-form-item/union/asyncActivityRegisterImportExcel?activityId=${id}`,
    method: 'post',
    data
  })
}

/** 以下为2024-4活动新接口 */
/** 活动列表 */
export function getUnionActivityList(data) {
  return axios({
    url: `/admin/activity/union/list?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/** 活动-创建活动 */
export function createUnionActivity(data) {
  return axios({
    url: `/admin/activity/union/create`,
    method: 'post',
    data
  })
}

/** 编辑活动部分信息，新出了一个单独的针对部分活动更新的接口，针对以下场景
/admin/activity/union/editSection

1. 场景：活动管理，取消活动
2. 场景：发布活动(上架)
3. 场景：活动列表(上架/下架) */
export function editSection(data) {
  return axios({
    url: `/admin/activity/union/editSection`,
    method: 'post',
    data
  })
}

export function editUnionActivity(data) {
  return axios({
    url: `/admin/activity/union/edit`,
    method: 'post',
    data
  })
}

/** 活动-活动详情(新增编辑使用) */
export function getUnionActivityInfo(id) {
  return axios({
    url: `/admin/activity/union/get/${id}`,
    method: 'get'
  })
}

/** 活动-活动详情(详情页头部使用) */
export function getActivityInfo(id) {
  return axios({
    url: `/admin/activity/union/getActivityInfo/${id}`,
    method: 'get'
  })
}

/** 活动-编辑活动详情 */
export function editUnionActivityDetail(data) {
  return axios({
    url: `/admin/activity/detail/union/edit`,
    method: 'post',
    data
  })
}

/** 活动-查询活动详情列表 */
export function getUnionActivityDetailList(id) {
  return axios({
    url: `/admin/activity/detail/union/list?activityId=${id}`,
    method: 'post'
  })
}

/** 活动-活动分类树形结构 */
export function getActivityCategoryTree(params) {
  return axios({
    url: `/admin/activity/org/category/tree`,
    method: 'get',
    params
  })
}

/** 活动-详情统计 */
export function getActivityCountInfo(id) {
  return axios({
    url: `/admin/activity/union/getActivityCountInfo/${id}`,
    method: 'get'
  })
}

/** 获取自定义字段查询 */
export function getQueryFormItemList(id) {
  return axios({
    url: `/admin/activity-form-item/union/getQueryItemList`,
    method: 'post',
    data: { activityId: id }
  })
}

/** 设置活动报名成功虚拟人数 */
export function setUntrueNum(data) {
  return axios({
    url: `/admin/activity/union/editUntrueNum`,
    method: 'post',
    data
  })
}

/** 跨会合作列表查询 */
export function activityPartnerList(data) {
  return axios({
    url: `/admin/activity-partner-review/union/list?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/** 未合作机构列表 */
export function activityPartnerOrgList(data) {
  return axios({
    url: `/admin/activity-partner-review/union/orgList?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/** 邀请合作 */
export function activityInvite(data) {
  return axios({
    url: `/admin/activity-partner-review/union/invite`,
    method: 'post',
    data
  })
}

/** 跨会合作审核列表查询 */
export function activityPartnerApList(data) {
  return axios({
    url: `/admin/activity-partner-review/union/apList?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/** 跨会合作审核 */
export function activityPartnerAp(data) {
  return axios({
    url: `/admin/activity-partner-review/union/ap`,
    method: 'post',
    data
  })
}

/** 活动-已合作活动资源的+本组织(组织列表) */
export function getActivityOrganization(id) {
  return axios({
    url: `/admin/activity/union/activityMap/${id}`,
    method: 'get'
  })
}

// 举办单位列表
export function getActivityPartners(id) {
  return axios({
    url: `/admin/activity/union/partners/list?activityId=${id}`,
    method: 'get'
  })
}

// 举办单位标签设置
export function setActivityPartners(data) {
  return axios({
    url: `/admin/activity/union/partners/createOrUpdate`,
    method: 'post',
    data
  })
}

// 举办单位标签列表
export function getPartnersTagList() {
  return axios({
    url: `/admin/activity/union/partners/tagList`,
    method: 'get'
  })
}

/**
 * 获取职务列表
 * @param {*} params
 * @returns
 */
export function getUnionMemberLevelList(params) {
  return axios({
    url: `/admin/activity/ticket/union/memberLevelList`,
    method: 'get',
    params
  })
}

/**
 * 新增或修改票种配置
 * @param {*} data
 * @returns
 */
export function createOrUpdateTicket(data) {
  return axios({
    url: `/admin/activity/ticket/union/createOrUpdate`,
    method: 'post',
    data
  })
}

/**
 * 查询票种列表
 * @param {*} params
 * @returns
 */
export function getUnionActivityTicketList(params) {
  return axios({
    url: `/admin/activity/ticket/union/list`,
    method: 'get',
    params
  })
}

/**
 * 票种详情
 * @param {*} params
 * @returns
 */
export function getTicketDtail(params) {
  return axios({
    url: `/admin/activity/ticket/union/detail`,
    method: 'get',
    params
  })
}

/**
 * 删除票种
 * @param {*} id
 * @returns
 */
export function delTicketById(id) {
  return axios({
    url: `/admin/activity/ticket/union/delete/${id}`,
    method: 'post'
  })
}

/**
 * 验证是否可以添加付费票
 * @param {*} params
 * @returns
 */
export function validCreatePayTicket(params) {
  return axios({
    url: `/admin/activity/ticket/union/validCreate`,
    method: 'get',
    params
  })
}
/**
 * 获取链接
 * @param {*} data
 * @returns
 */
export function generateUrlLink(data) {
  return axios({
    url: `/admin/activity/union/generateUrlLink`,
    method: 'post',
    data
  })
}
/**
 * 活动票种数据统计
 * @param {*} id
 * @returns
 */
export function getActivityTicketCountInfo(id) {
  return axios({
    url: `/admin/activity/ticket/union/getActivityTicketCountInfo/${id}`,
    method: 'get'
  })
}

/**
 * 数据中心】活动售票数据总览
 * @param {*} id
 * @returns
 */
export function getTicketTotalCountInfo(id) {
  return axios({
    url: `/admin/activity/ticket/union/totalCountInfo/${id}`,
    method: 'get'
  })
}

/**
 * 销售数据排行
 * @param {*} id
 * @returns
 */
export function getOrderList(id) {
  return axios({
    url: `/admin/activity/ticket/union/orderList/${id}`,
    method: 'get'
  })
}

/**
 * 协办组织售票数据列表
 * @param {*} params
 * @returns
 */
export function getPartnerOrgList(activityId, params) {
  return axios({
    url: `/admin/activity/ticket/union/partnerOrgList/${activityId}`,
    method: 'get',
    params
  })
}

/**
 * 导出本会邀约详情统计列表PCExcel
 * @param {*} data
 * @returns
 */
export function exportStatisticsExcel(data) {
  return axios({
    url: `/admin/activity-union/invite/exportStatisticsExcel?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    responseType: 'blob',
    timeout: 0,
    data
  })
}

export function inviteShareStatisticsList(data) {
  return axios({
    url: `/admin/activity-union/invite/inviteShareStatisticsList?current=${data.current}&size=${data.size}`,
    method: 'post',
    data
  })
}

/**
 * 邀约详情统计
 * @param {*} params
 * @returns
 */
export function getInviteDetailCount(params) {
  return axios({
    url: `/admin/activity-union/invite/detailCount`,
    method: 'get',
    params
  })
}

/**
 * 票种名称列表
 * @param {*} activityId
 * @returns
 */
export function getTicketList(activityId) {
  return axios({
    url: `/admin/activity/ticket/union/app/select`,
    method: 'get',
    params: { activityId }
  })
}

/**
 * 合作配置
 * @param {*} data
 * @returns
 */
export function apConfig(data) {
  return axios({
    url: `/admin/activity-partner-review/union/apConfig`,
    method: 'post',
    data
  })
}

/**
 * 验证活动是否存在付费票
 * @param {*} data
 * @returns
 */
export function validExistPayTicket(activityId) {
  return axios({
    url: `/admin/activity/ticket/union/validExistPayTicket`,
    method: 'get',
    params: { activityId }
  })
}

/**
 * 报名详情
 * @param {*} id
 * @returns
 */
export function getRegisterDetail(id) {
  return axios({
    url: `/admin/activityRegister/union/selectRegisterDetailInfo/${id}`,
    method: 'get'
  })
}

/**
 * 退票申请列表
 * @param {*} activityId
 * @returns
 */
export function registerRefundApplyPage(data) {
  return axios({
    url: `/admin/activity-register-order/union/registerRefundApplyPage?current=${data.current}&size=${data.pageSize}`,
    method: 'post',
    data
  })
}

/**
 * 取消报名审核
 * @param {*} data
 * @returns
 */
export function auditRegisterRefundApply(data) {
  return axios({
    url: `/admin/activity-register-order/union/auditRegisterRefundApply`,
    method: 'post',
    data
  })
}

/**
 * 活动详情富文本列表
 * @param {*} activityId
 * @returns
 */
export function getDetailPreviewList(params) {
  return axios({
    url: `/admin/activity-union/detailPreview/list`,
    method: 'get',
    params
  })
}

/**
 * 活动预览举办单位
 * @param {*} activityId
 * @returns
 */
export function getPreviewActivityPartners({ activityId, partnerReviewRecordId }) {
  return axios({
    url: `/admin/activity-union/getActivityPreviewPartners/${activityId}`,
    method: 'get',
    params: { partnerReviewRecordId }
  })
}

/**
 * 活动详情预览
 * @param {*} activityId
 * @returns
 */
export function getActivityReview({ activityId, partnerReviewRecordId }) {
  return axios({
    url: `/admin/activity/union/getActivity/review/${activityId}`,
    method: 'get',
    params: { partnerReviewRecordId }
  })
}

/**
 * 校验最大报名数
 * @param {*} params
 * @returns
 */
export function validMaxNum(params) {
  return axios({
    url: `/admin/activity-partner-review/union/validMaxNum`,
    method: 'get',
    params
  })
}

/**
 * 活动二维码
 * @param {*} activityId
 * @returns
 */
export function createDetailsQrcode(activityId) {
  return axios({
    url: `/admin/activity/union/createDetailsQrcode/${activityId}`,
    method: 'get'
  })
}

/**
 * 批量审核取消报名申请
 * @param {*} params
 * @returns
 */
export function activityRegisterOrderBatchVerify(data) {
  return axios({
    url: `/admin/activity-register-order/union/batchVerify`,
    method: 'post',
    data
  })
}

/**
 * 批量取消报名
 * @param {*} params
 * @returns
 */
export function activityRegisterBatchVerify(data) {
  return axios({
    url: `/admin/activityRegister/union/batchVerify`,
    method: 'post',
    data
  })
}

/**
 * 取消报名记录列表
 * @param {*} registerId
 * @returns
 */
export function activityRegisterUnionCancelRecord(registerId) {
  return axios({
    url: `/admin/activity-register-union-cancel-record/sys/list/${registerId}`,
    method: 'get'
  })
}

/**
 * 检测相似的报名者信息
 * @param {*} registerId
 * @returns
 */
export function searchRegisterListByAdmin(registerId) {
  return axios({
    url: `/admin/activityRegister/union/searchRegisterListByAdmin/${registerId}`,
    method: 'post'
  })
}

/**
 * 获取自定义报名者信息库
 * @returns
 */
export function getCustomUserInfoFieldLibrary() {
  return axios({
    url: `/admin/custom-user-info-field-library/list`,
    method: 'get'
  })
}

/**
 * @description 查询分组列表接口
 * @date 04/09/2024
 * @export
 * @param {*} activityArrangeId
 */
export function arrangeGroupSelect(activityArrangeId) {
  return axios({
    url: `/admin/activityArrange/arrangeGroupSelect`,
    method: 'get',
    params: {
      activityArrangeId
    }
  })
}

/**
 * @description 查询位置列表接口
 * @date 04/09/2024
 * @export
 * @param {*} groupId
 */
export function arrangeSeatSelect(groupId) {
  return axios({
    url: `/admin/activityArrange/arrangeSeatSelect`,
    method: 'get',
    params: {
      groupId
    }
  })
}

/**
 * @description 活动安排 - 换位置接口
 * @date 04/09/2024
 * @export
 * @param {*} data
 */
export function activityChangeSeat(data) {
  return axios({
    url: `/admin/activityArrange/changeSeat`,
    method: 'post',
    data
  })
}

/**
 * 排座总览
 * @param {*} activityArrangeId 
 * @returns 
 */
export function selectArrangeAllSeatView(activityArrangeId) {
  return axios({
    url: `admin/activityArrange/selectArrangeAllSeatView`,
    method: 'get',
    params: {
      activityArrangeId
    }
  })
}

/**
 * 查询台卡物料
 * @param {*} id 
 * @returns 
 */
export function getDeccaMaterial(id) {
  return axios({
    url: `/admin/activity/union/deccaMaterial/${id}`,
    method: 'get',
  })
}
